<?
include_once "accesscontrol.php";

//jobseeker view his resume

$q = "select * from job_seeker_info where uname = \"$uname\"";
$r = mysql_query($q) or die(mysql_error());
$a = mysql_fetch_array($r);

$q1 = "select * from job_work_experience where uname = \"$uname\" order by WEn desc ";
$r1 = mysql_query($q1) or die(mysql_error());

?>

<br>

<table width=460 align=center cellpadding=0 class=BlackText>
<caption align=center><b><? echo $a[rTitle] ?><br><br><br></b> 
<img src="../re_images/<?=$a[image]?>" width="150" height="200"><br><br>
<table cellspacing=0 width=100% class=BlackText>
			<tr>			
			<td bgcolor=dddddd valign=top align=center>
			<b>My Introduce</b>
			</td>
			</tr>

			<tr>
			<td>
			<?=$a[rPar]?> 
			</td>			
			</tr>
			</table><br>
</caption>
<tr>			
		<td bgcolor=dddddd valign=top align=center>
			<b>Personal Particulars</b>
		</td>
	</tr>
<tr>
<td valign=top>
	<table width=470 align=center  cellspacing=0 border=0 rules=rows bordercolor=black class=BlackText>		
	<tr>
		<td width=100><b>Name:</b></td>
		<td valign=top>
			<? echo "$a[title] $a[fname] $a[lname]"; ?>
		</td>
	</tr>

		<tr>
		<td>
		<b>Age: </b>
		</td>
		<td valign=top>
		<?
		$use_month = date("m", strtotime("$a[bmonth] $a[bday] $a[byear]"));

		if((date(m) > $use_month) || (date(m) == $use_month && date(d) >= $a[bday]))
		{
				$age = date(Y) - $a[byear];
		    echo date(Y) - $a[byear];
		}
		else
		{
			$age = date(Y) - $a[byear] - 1;
		  echo date(Y) - $a[byear] - 1;
		}
		?>
		</td>
		</tr>

		<tr>
			<td><b>Gender:</b></td>
			<td  valign=top>
				<? echo $a[sex]; ?>
			</td>
		</tr>
		<tr>
			<td valign=top><b>Marital status:</b></td>
			<td><?=$a[maritalstatus]?></td>
		</tr>
		<tr>
			<td><b>Nationality:</b></td>
			<td  valign=top>
				<?=$a[nationality]?>
			</td>
		</tr>
	</table><br>
</td>
</tr>

<tr>			
	<td bgcolor=dddddd valign=top align=center>
		<b>Contact Info</b>
	</td>
</tr>
			
<tr>
<td valign=top>
	<table align=center width=470  cellpadding=0 cellspacing=0 border=0 bordercolor=black rules=rows class=BlackText>

	<tr>
	<td><b> Address: </b></td>
	<td width=400>
	<?=$a[city]?>, <?=$a[address]?> <?=$a[street]?>, <?=$a[zip]?> <?=$a[state]?>
	</td>
	</tr>

	<tr>
		<td><b> Country: </b></td>
		<td width=380><?=$a[country]?></td>
	</tr>

	<tr>
		<td valign=top><b>Phone:</b></td>
		<td valign=top><?=$a[phone]?>
			
		<?
		if(!empty($a[phone2]))
		{
			echo "<br>Mobile: $a[phone2]";
		}		
		?>
		</td>
	</tr>
		
		<?
		if(!empty($a[fax]))
		{
			echo "<tr>\n\t<td><b>Fax</b></td>\n\t<td bgcolor=dddddd>$a[fax]</td>\n</tr>\n\n";
		}	
		?>

	<tr>
		<td><b>E-mail: </b></td>
		<td><?=$a[job_seeker_email]?></td>
	</tr>
	</table><br>
</td>
</tr>

<tr>			
	<td bgcolor=dddddd valign=top align=center>
		<b>Extra Info</b>
	</td>
</tr>

<table align=center width=470 border=0 bordercolor=black  cellspacing=0 class=BlackText>
<tr>
	<td valign=top><b>Required income:</b></td>
	<td width=300><?=$a[income]?></td>
</tr>

<tr>
	<td valign=top><b>Target company:</b></td>
	<td><?=$a[target_company]?></td>
</tr>

<tr>
	<td><b>Availability Employment</b></td>
	<td><?=$a[employment]?></td>
</tr>
</table>

<br><br><br>
	<table cellspacing=0 width=470 align=center class=BlackText>
		<tr>			
			<td bgcolor=dddddd valign=top align=center>
				<b>Latest Employment</b>
			</td>
		</tr>
</table>

<?

echo "<br><br>";
while ($a1 = mysql_fetch_array($r1))
{
	echo "
	<form action=EditWorkExperience.php method=post>
	<table align=center width=470 border=0 bordercolor=black cellspacing=0 cellpadding=0 class=BlackText>
	</form>	
	<tr>
		<td>No $a1[WEn]</td>
	</tr>
	<tr>
		<td width=100><b>Position: </b></td>
		<td> $a1[WE_p] </td>
	</tr>

	<tr>
		<td><b>From date: </b></td>
		<td>$a1[WE_Start]</td>
	</tr>
	<tr>
		<td><b>To date: </b></td>
		<td>$a1[WE_End]</td>
	</tr>
	<tr>
		<td><b> Description: </b></td>
		<td>$a1[WE_d]</td>
	</tr>
</table><br>
";
}


$q1 = "select * from job_education where uname = \"$uname\" order by En asc ";
$r2 = mysql_query($q1) or die(mysql_error());

echo"
<br><br>
	<table cellspacing=0 width=470 align=center class=BlackText>
		<tr>			
			<td bgcolor=dddddd valign=top align=center>
				<b>Highest Qualification</b>
			</td>
		</tr>
</table>
";
while ($a1 = mysql_fetch_array($r2))
{
	echo "
<form action=EditEducation.php method=post>
	<table align=center width=470 border=0 bordercolor=black cellspacing=0 cellpadding=0 class=BlackText>
	</form>
	<tr>
		<td>No $a1[En]</td>
	<tr>
		<td width=150><b>Education Institution: </b></td><td>";  echo stripslashes($a1[E_i]); echo "</td>
	</tr>

	<tr>
		<td><b>Graduate Level </b></td>
		<td>$a1[E_gr] </td>		
	</tr>
	<tr>
		<td><b>From date </b></td>
		<td>$a1[E_Start] </td>
	<tr>
	<tr>
		<td><b>To date </b></td>
		<td>$a1[E_End] </td>
	</tr>
	<tr>
		<td><b>Description: </b></td>
		<td>$a1[E_d]</td>	 
	</tr>		
</table>
";
}


$q4 = "select * from job_skills where uname = \"$uname\" ";
$r4 = mysql_query($q4) or die(mysql_error());

while($a4 = mysql_fetch_array($r4))
{
$aaa = stripslashes($a4[SK_d]);
$aaa = nl2br($aaa);
$bbb = stripslashes($a4[expertise]);
$bbb = nl2br($bbb);

	if(!empty($bbb)){
	echo "
	<br><br>
	<table cellspacing=0 width=470 align=center class=BlackText>
		<tr>			
			<td bgcolor=dddddd valign=top align=center>
				<b>Expertise / Interest</b>
			</td>
		</tr>
	</table>
	<table align=center width=470 border=0 bordercolor=black cellspacing=0 class=BlackText>
	<tr>
	<td colspan=2> $bbb </td>
	</tr>
	</table>	
		<br><br>";
	}	
	echo"
	<br><br>
	<table cellspacing=0 width=470 align=center class=BlackText>
		<tr>			
			<td bgcolor=dddddd valign=top align=center>
				<b>Additional Skills</b>
			</td>
		</tr>
	</table>
	<table align=center width=470 border=0 bordercolor=black cellspacing=0 class=BlackText>
	<tr>
		<td colspan=2> $aaa </td>
	</tr>
	</table>	
<br><br>
";

}


include_once('download.php');
include_once('../footer.php');
?>